<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <input type="text" value="张三" placeholder="请输入姓名">
    <input type="checkbox" class="inp2">
    <button>按钮</button>
    <select name="姓名" id="1">
        <option value="apple">苹果</option>
        <option value="pear">梨</option>
        <option value="orange">橙子</option>
    </select>
    <div class="box" data-name="xzh" data-id="183"></div>
    <script>
        const inp=document.querySelector('input')
        inp.value='李四'

        const inp2=document.querySelector('.inp2')
        inp2.checked=true

        const sel=document.querySelectorAll('select option')
        sel.select=true

        const but=document.querySelector('buttom')
        // but.disable=true

        const data=document.querySelector('.box')
        console.log(data.dataset)
    </script>
</body>
</html>